<!--  -->
<template>
  <div class="search-page">
    <c-title :hide="false" text="搜索页"></c-title>
    <van-search v-model="query.search.keyword" placeholder="搜索课程" shape="round" @input="searchChange" />
    <div class="search-list flex-j-sb" v-if="searchList.length > 0">
      <block v-for="(item,index) in searchList" class="goods-item" :key="index">
        <goods-item :dataItem="item" :index="index"></goods-item>
      </block>
    </div>
    <van-empty description="暂无数据" v-else/>
  </div>
</template>

<script>
import search_controller from "./search_controller.js";
export default search_controller;
</script>
<style lang="scss" scoped>
/* @import url(); 引入公共css类 */
.search-page {
  .search-list {
    padding: 0.75rem 0 0 0;
    margin: 0 0.75rem;
    flex-wrap: wrap;

    .goods-item {
      border-radius: 0.625rem 0.625rem 0.625rem 0.625rem;
      background-color: #fff;
      width: calc(50% - 0.25rem);
      margin: 0 0 0.5rem 0;
    }
  }
}
</style>